package by.demchenko.sample.dataaccess.base;

import by.demchenko.sample.datamodel.Course;
import by.demchenko.sample.datamodel.Person;
import by.demchenko.sample.datamodel.Schedule;
import by.demchenko.sample.datamodel.Section;
import by.demchenko.sample.datamodel.enums.ScheduleStatus;

import javax.persistence.metamodel.SingularAttribute;
import java.util.List;

public interface CourseDao extends AbstractDao<Integer, Course> {

    Integer getCount();

    List<Schedule> getCourseToRegister();

    List<Course> getCourseToRegister(Section section);

    List<Course> getCourseForTable(Person teacher);

    List<Course> getCourseRegistrationStatus(ScheduleStatus status);

    List<Course> findAll(boolean fetchJoins);

    List<Course> findAll(SingularAttribute<Course, ?> attr, boolean ascending, int startRecord, int pageSize, boolean fetchJoins);

    List<Course> getCourseBySection(Section section);

    Course findByName(String name);
}